window.onload = function () {
  var input = document.querySelectorAll('input');
  console.log(input);
  var sub = document.querySelector('.submit');
  sub.addEventListener('click', function () {
    for (var i = 0; i < input.length; i++){
      if (input[i].value =='') alert('检查是否有数据没填');
    }
  })
}